package cq.com.cn.service;

import cq.com.cn.dao.BooksDao;
import cq.com.cn.model.BooksModel;

import java.util.List;

/**
 * 业务层代码
 */
public class BooksService {

    public List<BooksModel> queryBooksOfType(int type){
        BooksDao booksDao=new BooksDao();
        return booksDao.queryBookByType(type);
    }

    public List<BooksModel> queryBooksByName(String bookName) {
        BooksDao booksDao=new BooksDao();
        return booksDao.queryBookByName(bookName);
    }

    public BooksModel selectBookById(String id){
        BooksDao booksDao=new BooksDao();
        return booksDao.queryBookById(id);
    }


}
